using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;

namespace Acms.WebControls
{
    public class CheckBoxField : System.Web.UI.WebControls.CheckBoxField
    {
        protected override void OnDataBindField(object sender, EventArgs e)
        {
            base.OnDataBindField(sender, e);
            CheckBox tmp = sender as CheckBox;
            if (tmp.Enabled && tmp.Checked && !AllowRemoveChecked)
            {
                tmp.Enabled = false;
            }
        }

        private bool allowRemoveChecked = true;
        public bool AllowRemoveChecked
        {
            get { return allowRemoveChecked; }
            set { allowRemoveChecked = value; }
        }
	
    }
}
